package controller.pub;

import controller.MyCoolServlet;
import java.io.*;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.*;
import javax.servlet.http.*;
import model.Product;

public class DeleteCarritoServlet extends MyCoolServlet {

    @Override
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        HttpSession s = request.getSession();
        Map<String,Product> carro = (HashMap) s.getAttribute("carrito");
        carro.clear();
        s.setAttribute("carrito", carro);
        gotoURL(carrito, request, response);
    }
}